package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotate.AutoFill;
import com.sky.entity.Dish;
import com.sky.entity.Setmeal;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishOverViewVO;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishMapper {
    List<DishVO> pageSelectDish(Dish dish);

    Dish selectDishById(Long id);

    List<Dish> selectDishByCategoryId(Long categoryId);

    @AutoFill(OperationType.INSERT)
    void insertDish(Dish dish);

    @AutoFill(OperationType.UPDATE)
    void updateDish(Dish dish);

    void deleteDishById(List<Long> ids);

    Setmeal selectSetmeal(Long id);

    List<Dish> selectDishBySetmeal(Long id);

    List<DishVO> getDishVO(Long categoryId);

    DishOverViewVO countDishesStatus();
}
